<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link th:replace="template/sys_header :: header"/>
</head>
<body class="index">
<!-- 顶部开始 -->
<div class="container">
    <!-- 顶部开始 -->
    <div class="container">
        <div class="logo">
            <a href="/sys/main">ZyAdmin</a></div>
        <div class="left_open">
            <a><i title="展开左侧栏" class="iconfont">&#xe699;</i></a>
        </div>
        <ul class="layui-nav left fast-add" lay-filter="">
            <li class="layui-nav-item">
                <a href="javascript:;">+新增<span class="layui-nav-more"></span></a>
                <dl class="layui-nav-child">
                    <!-- 二级菜单 -->
                    <dd>
                        <a onclick="xadmin.open('最大化','http://www.baidu.com','','',true)">
                            <i class="iconfont">&#xe6a2;</i>弹出最大化</a></dd>
                    <dd>
                        <a onclick="xadmin.open('弹出自动宽高','http://www.baidu.com')">
                            <i class="iconfont">&#xe6a8;</i>弹出自动宽高</a></dd>
                    <dd>
                        <a onclick="xadmin.open('弹出指定宽高','http://www.baidu.com',500,300)">
                            <i class="iconfont">&#xe6a8;</i>弹出指定宽高</a></dd>
                    <dd>
                        <a onclick="xadmin.add_tab('在tab打开','member-list.html')">
                            <i class="iconfont">&#xe6b8;</i>在tab打开</a></dd>
                    <dd>
                        <a onclick="xadmin.add_tab('在tab打开刷新','member-del.html',true)">
                            <i class="iconfont">&#xe6b8;</i>在tab打开刷新</a></dd>
                </dl>
            </li>
        </ul>
        <ul class="layui-nav right" lay-filter="">
            <li class="layui-nav-item">
                <a href="javascript:;"><span th:text="${currentUserName}">admin</span></a>
                <dl class="layui-nav-child">
                    <!-- 二级菜单 -->
                    <dd><a onclick="xadmin.open('修改密码','/sys/user/updatePwd', 780 , 300)">修改密码</a></dd>
                    <!--<dd><a onclick="xadmin.open('切换帐号','http://www.baidu.com')">切换帐号</a></dd>-->
                    <dd><a href="javascript:loginout()">退出</a></dd>
                </dl>
            </li>
        </ul>
    </div>
    <!-- 顶部结束 -->
    <!-- 中部开始 -->
    <!-- 左侧菜单开始 -->
    <div class="left-nav">
        <div id="side-nav">
            <ul id="nav">
                <!-- 输出后台生成的菜单html -->
                <div th:utext="${menus}"></div>
                <!--
                <li>
                    <a href="javascript:;">
                        <i class="iconfont left-nav-li" lay-tips="会员管理">&#xe6b8;</i>
                        <cite>会员管理</cite>
                        <i class="iconfont nav_right">&#xe697;</i></a>
                    <ul class="sub-menu">
                        <li>
                            <a  _href="member-list2.html">
                                <i class="iconfont">&#xe6a7;</i>
                                <cite>会员删除</cite></a>
                        </li>
                        <li>
                            <a href="javascript:;">
                                <i class="iconfont">&#xe70b;</i>
                                <cite>会员管理</cite>
                                <i class="iconfont nav_right">&#xe697;</i></a>
                            <ul class="sub-menu">
                                <li>
                                    <a  _href="member-del.html">
                                        <i class="iconfont">&#xe6a7;</i>
                                        <cite>会员删除</cite></a>
                                </li>
                                <li>
                                    <a  _href="https://www.baidu.com">
                                        <i class="iconfont">&#xe6a7;</i>
                                        <cite>等级管理</cite></a>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </li>
                <li>
                    <a href="javascript:;">
                        <i class="iconfont left-nav-li" lay-tips="系统管理">&#xe6a2;</i>
                        <cite>系统管理</cite>
                        <i class="iconfont nav_right">&#xe697;</i></a>
                    <ul class="sub-menu">
                        <li>
                            <a _href="/sys/menu/list">
                                <i class="iconfont">&#xe6a7;</i>
                                <cite>菜单管理</cite>
                            </a>
                        </li>
                        <li>
                            <a _href="/sys/organization/list">
                                <i class="iconfont">&#xe6a7;</i>
                                <cite>组织机构</cite>
                            </a>
                        </li>
                        <li>
                            <a _href="/sys/user/list">
                                <i class="iconfont">&#xe6a7;</i>
                                <cite>用户管理</cite>
                            </a>
                        </li>
                        <li>
                            <a _href="/sys/role/list">
                                <i class="iconfont">&#xe6a7;</i>
                                <cite>角色管理</cite>
                            </a>
                        </li>
                    </ul>
                </li>
                -->
            </ul>
        </div>
    </div>
    <!-- <div class="x-slide_left"></div> -->
    <!-- 左侧菜单结束 -->
    <!-- 右侧主体开始 -->
    <div class="page-content">
        <div class="layui-tab tab" lay-filter="xbs_tab" lay-allowclose="false">
            <ul class="layui-tab-title">
                <li class="home">
                    <i class="layui-icon">&#xe68e;</i>我的桌面</li></ul>
            <div class="layui-unselect layui-form-select layui-form-selected" id="tab_right">
                <dl>
                    <dd data-type="fresh">刷新页面</dd>
                    <dd data-type="this">关闭当前</dd>
                    <dd data-type="other">关闭其它</dd>
                    <dd data-type="all">关闭全部</dd></dl>
            </div>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">
                    <iframe src='/sys/main/desktop' id="x-iframe" name="x-iframe" frameborder="0" scrolling="yes" class="x-iframe"></iframe>
                </div>
            </div>
            <div id="tab_show"></div>
        </div>
    </div>
    <div class="page-content-bg"></div>
    <style id="theme_style"></style>

<!-- 右侧主体结束 -->
<!-- 中部结束 -->
<!-- 底部开始 -->
<div class="footer">
    <div style="text-align: center">Copyright ©2019 ZyAdmin All Rights Reserved</div>
</div>
<!-- 底部结束 -->

<script type="text/javascript" th:replace="template/sys_header :: footer"></script>
<script type="text/javascript">
    $(function () {
        var token = getCookie("token");
        if(!token){
            console.log("token invalid");
            window.location.replace('/');
        }
    });

    //退出登录
    function loginout() {
        xadmin.del_data();
        delCookie("token");
        window.location.replace('/');
    }
</script>
</body>
</html>